//
//  ViewController.m
//  CollectionTest
//
//  Created by yuze on 2016/10/19.
//  Copyright © 2016年 yuze. All rights reserved.
//

#import "ViewController.h"
#import "YZFlowCollectionVC.h"
#import "YZWaterfallCollectionVC.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    
    UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
    btn.frame = CGRectMake(100, 100, 200, 100);
    [btn setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
    [btn setTitle:@"进入流式布局" forState:UIControlStateNormal];
    [btn addTarget:self action:@selector(enterFlowCollectionVc) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:btn];
    
    {
        UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
        btn.frame = CGRectMake(100, 200, 200, 100);
        [btn setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
        [btn setTitle:@"进入瀑布式布局" forState:UIControlStateNormal];
        [btn addTarget:self action:@selector(enterWaterfallCollectionVc) forControlEvents:UIControlEventTouchUpInside];
        [self.view addSubview:btn];
    }
    
}

#pragma  -- mark action method

- (void)enterFlowCollectionVc
{
    UIViewController *vc = [[YZFlowCollectionVC alloc] init];
    [self.navigationController pushViewController:vc animated:YES];
}

- (void)enterWaterfallCollectionVc
{
    UIViewController *vc = [[YZWaterfallCollectionVC alloc] init];
    [self.navigationController pushViewController:vc animated:YES];
}

@end
